all:clfetion

SRC_PATH = .

INCLUDES = -I./ -I/usr/lib/boost/include/ -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include \
		-I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 \
 		-I/usr/lib/glib-2.0/include

LDFLAGS = -L/usr/lib/boost/lib/ -lsqlite3 -lboost_thread -lssl -lboost_system -lxml++-2.6

CXX = g++
CXXFLAGS = -Wall -g $(INCLUDES) $(LDFLAGS)

SOURCES = $(wildcard $(SRC_PATH)/*.cpp)
OBJS = $(patsubst %.cpp,%.o,$(SOURCES))

clfetion: $(OBJS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) -g -o $@ $^
	-mkdir -p ../bin
	-mkdir -p ../obj
	-cp clfetion ../bin
	-cp $(OBJS) ../obj 

release: $(OBJS)
	-rm -f ../bin/*
	-rm -f ../obj/*
	-rm -f $(OBJS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) -o $@ $^
	-mkdir -p ../bin
	-mkdir -p ../obj
	-mv clfetion ../bin
	-mv $(OBJS) ../obj 

.PHONY:clean
clean:
	-rm -f ../bin/*
	-rm -f ../obj/*
	-rm -f $(OBJS)
